package com.tek.ding.faceding.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class AppVersion implements Parcelable {

    /**
     * 主键ID
     */
    private Long id;

    /**
     * app类型 1.Android 2.iOS
     */
    private Integer type;

    /**
     * 版本号 1
     */
    private Integer versionCode;

    /**
     * 版本名 1.0.0
     */
    private String versionName;

    /**
     * 下载地址
     */
    private String downloadUrl;

    /**
     * 二维码地址
     */
    private String codeUrl;

    /**
     * 更新内容
     */
    private String content;

    /**
     * 是否强制更新 1.是 0.不是
     */
    private Integer forceStatus;

    /**
     * 启用状态 0.禁用 1.启用
     */
    private Integer enabled;

    /**
     * 添加时间
     */
    private String addTime;

    /**
     * 修改时间
     */
    private String editTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getVersionCode() {
        return versionCode;
    }

    public void setVersionCode(Integer versionCode) {
        this.versionCode = versionCode;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public String getCodeUrl() {
        return codeUrl;
    }

    public void setCodeUrl(String codeUrl) {
        this.codeUrl = codeUrl;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getForceStatus() {
        return forceStatus;
    }

    public void setForceStatus(Integer forceStatus) {
        this.forceStatus = forceStatus;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public String getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }

    public String getEditTime() {
        return editTime;
    }

    public void setEditTime(String editTime) {
        this.editTime = editTime;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeValue(this.type);
        dest.writeValue(this.versionCode);
        dest.writeString(this.versionName);
        dest.writeString(this.downloadUrl);
        dest.writeString(this.codeUrl);
        dest.writeString(this.content);
        dest.writeValue(this.forceStatus);
        dest.writeValue(this.enabled);
        dest.writeString(this.addTime);
        dest.writeString(this.editTime);
    }

    public AppVersion() {
    }

    protected AppVersion(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.type = (Integer) in.readValue(Integer.class.getClassLoader());
        this.versionCode = (Integer) in.readValue(Integer.class.getClassLoader());
        this.versionName = in.readString();
        this.downloadUrl = in.readString();
        this.codeUrl = in.readString();
        this.content = in.readString();
        this.forceStatus = (Integer) in.readValue(Integer.class.getClassLoader());
        this.enabled = (Integer) in.readValue(Integer.class.getClassLoader());
        this.addTime = in.readString();
        this.editTime = in.readString();
    }

    public static final Parcelable.Creator<AppVersion> CREATOR = new Parcelable.Creator<AppVersion>() {
        @Override
        public AppVersion createFromParcel(Parcel source) {
            return new AppVersion(source);
        }

        @Override
        public AppVersion[] newArray(int size) {
            return new AppVersion[size];
        }
    };
}
